package com.example.demo.service;

import com.example.demo.dto.RoleDepartmentUserDTO;
import com.example.demo.entity.RoleDepartmentUser;
import com.example.demo.request.CreateRoleDepartmentUserRequest;
import java.util.List;

public interface RoleDepartmentUserService {

    /**
     * 分页查询角色部门用户关联列表
     */
    List<RoleDepartmentUserDTO> getRoleDepartmentUsers(int page, int size);

    /**
     * 获取角色部门用户关联总数
     */
    long countRoleDepartmentUsers();

    /**
     * 根据 ID 查询角色部门用户关联详情
     */
    RoleDepartmentUserDTO getRoleDepartmentUserById(Integer id);

    /**
     * 创建新角色部门用户关联
     */
    RoleDepartmentUser createRoleDepartmentUser(CreateRoleDepartmentUserRequest request);

    /**
     * 更新角色部门用户关联
     */
    void updateRoleDepartmentUser(Integer id, CreateRoleDepartmentUserRequest request);

    /**
     * 删除角色部门用户关联
     */
    void deleteRoleDepartmentUser(Integer id);
    
    /**
     * 根据角色名称模糊搜索
     */
    List<RoleDepartmentUserDTO> searchByRoleName(String roleName);
    
    /**
     * 根据部门名称模糊搜索
     */
    List<RoleDepartmentUserDTO> searchByDepartmentName(String departmentName);
    
    /**
     * 根据用户名称模糊搜索
     */
    List<RoleDepartmentUserDTO> searchByUserName(String userName);
}